<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>blog2_index</title>
</head>
<body>
<a href="{% url 'blog2:add_author' %}">添加作者</a> &nbsp;&nbsp;
<a href="{% url 'blog2:add_blog' %}">添加博客</a>
<h1>作者</h1>
{% for author in authors %}
    {{ author.name }} <a href="{% url 'blog2:author' author.id %}">查看</a>
    <br>

{% endfor %}
<br>
<h1>博客</h1>
{% for blog in blogs %}
    {{ blog.title }} <a href="{% url 'blog2:blog' blog.id %}">查看</a>
{% endfor %}

</body>
</html>